﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace Client
{
    /// <summary>
    /// Logique d'interaction pour Log.xaml
    /// </summary>

    public partial class Log : Window
    {

        MainWindow mainWindow;

        public Log(MainWindow mWindows)
        {
            this.InitializeComponent();

            mainWindow = mWindows;

            this.Loaded += new RoutedEventHandler(Log_Loaded);
        }

        public Log(String labelAvert)
        {
            this.InitializeComponent();
            this.LAvert.Content = labelAvert;

            this.Loaded += new RoutedEventHandler(Log_Loaded);
        }

        void Log_Loaded(object sender, RoutedEventArgs e)
        {
            //throw new NotImplementedException();
        }


        private void BValid_Click(object sender, RoutedEventArgs e)
        {
            mainWindow.User = TBUser.Text;
            mainWindow.Password = PBUser.Password;
            mainWindow.Adresse = TBAdresse.Text;

            this.Close();
        }
    }
}